[IA64] boot windows server 2003:fix a bug about nat
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 31 Jul 2006 16:18:28 +0000 (10:18 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 31 Jul 2006 16:18:28 +0000 (10:18 -0600)
Because EML_UNAT may be cahnged by guest bank switch,
it should be saved&restored at entry & exit path.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
xen/arch/ia64/vmx/vmx_entry.S
xen/arch/ia64/vmx/vmx_minstate.h

index 089374234527f4fe6bbc62d72d440bcae66448ae..53b00d90193b30f0a0adb30e1872efa781f901bd 100644 (file)
@@ -197,6 +197,11 @@ GLOBAL_ENTRY(ia64_leave_hypervisor)
     ;;
     mov ar.pfs=loc0
     adds r20=PT(PR)+16,r12
+    adds r8=PT(EML_UNAT)+16,r12
+    ;;
+    ld8 r8=[r8]
+    ;;
+    mov ar.unat=r8
     ;;
     lfetch [r20],PT(CR_IPSR)-PT(PR)
     adds r2 = PT(B6)+16,r12
index f7e676f66a25517020fc260913514d114d931753..8ac2c73f929fcf3e7b45a8955374b06da6e662c2 100644 (file)
     ;;                  \
     st8 [r24]=r9;           /* ar.csd */    \
     st8 [r25]=r10;          /* ar.ssd */    \
-    ;;
+    ;;         \
+    mov r18=ar.unat;    \
+    adds r19=PT(EML_UNAT)-PT(R4),r2;   \
+    ;;                 \
+    st8 [r19]=r18;       /* eml_unat */ \
+
 
 #define VMX_SAVE_EXTRA               \
 .mem.offset 0,0; st8.spill [r2]=r4,16;     \